package com.csun.cmny.provider.service;

import com.csun.cmny.base.dto.LoginAuthDto;
import com.csun.cmny.core.support.IService;
import com.csun.cmny.provider.model.domain.OmcMedicRecord;
import com.csun.cmny.provider.model.dto.medic.MedicRecordConfirmDto;
import com.csun.cmny.provider.model.dto.medic.MedicRecordFeedDto;
import com.csun.cmny.provider.model.dto.medic.MedicRecordQueryDto;
import com.csun.cmny.provider.model.dto.medic.MedicRecordTimeOutDto;
import com.csun.cmny.provider.model.vo.MedicRecordVo;
import com.csun.cmny.util.PubUtils;
import org.apache.ibatis.annotations.Param;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.List;
import java.util.Map;

/**
 * @Auther: chisj chisj@foxmal.com
 * @Date: 2019-08-13 15:09
 * @Description: the interface omc medic record service
 */
public interface OmcMedicRecordService extends IService<OmcMedicRecord> {

    /**
     * query medic record list with page
     *
     * @param medicRecordQueryDto   the medic record query dto
     *
     * @return  the list.
     */
    List<MedicRecordVo> queryListWithPage(MedicRecordQueryDto medicRecordQueryDto);

    /**
     * medic record feed
     *
     * @param medicRecordFeedDto    the medic record feed dto
     * @param loginAuthDto          the login auth dto
     *
     * @return  the int.
     */
    Integer feed(MedicRecordFeedDto medicRecordFeedDto, LoginAuthDto loginAuthDto);

    /**
     * medic record nursing confirm
     *
     * @param medicRecordConfirmDto the medic record config dto
     * @param loginAuthDto          the login auth dto
     *
     * @return  the int.
     */
    Integer nursingConfirm(MedicRecordConfirmDto medicRecordConfirmDto, LoginAuthDto loginAuthDto);

    /**
     * medic record monitor confirm
     *
     * @param medicRecordConfirmDto the medic record confirm dto
     * @param loginAuthDto          the login auth dto
     *
     * @return  the int.
     */
    Integer monitorConfirm(MedicRecordConfirmDto medicRecordConfirmDto, LoginAuthDto loginAuthDto);

    /**
     * medic record medic record time out dto
     *
     * @param medicRecordTimeOutDto the medic record time out dto
     * @param loginAuthDto          the login auth dto
     *
     * @return  the int.
     */
    Integer timeOut(MedicRecordTimeOutDto medicRecordTimeOutDto, LoginAuthDto loginAuthDto);

    /**
     * medic record apply
     *
     * @param param         the param
     * @param loginAuthDto  the login auth dto
     *
     * @return  the int.
     */
    Integer apply(Map<String, Object> param, LoginAuthDto loginAuthDto);

    /**
     * medic record feed delay by process instance id
     *
     * @param processInstanceId the process instance id
     *
     * @return  the int.
     */
    Integer feedDelayByProcessInstanceId(String processInstanceId);

    /**
     * medic record feed delay by process instance id
     *
     * @param processInstanceId the process instance id
     *
     * @return  the int.
     */
    Integer nursingConfirmDelayByProcessInstanceId(String processInstanceId);

    /**
     * medic record monitor confirm delay by process instance id
     *
     * @param processInstanceId the process instance id
     *
     * @return  the int.
     */
    Integer monitorConfirmDelayByProcessInstanceId(String processInstanceId);

    /**
     * medic record apply feed by process instance id
     *
     * @param processInstanceId the process instance id
     *
     * @return  the int.
     */
    Integer applyFeedByProcessInstanceId(String processInstanceId);

    /**
     * query medic record list by plan id and begin date
     *
     * @param medicPlanId   the medic plan id
     * @param beginDate     the begin date
     *
     * @return  the list
     */
    List<OmcMedicRecord> queryMedicRecordListByPlanIdAndBeginDate(Long medicPlanId, String beginDate);

    /*
    * 根据老人id查询用药异常
    *
    * */
    List<MedicRecordVo> queryOldmanMedicException(Long oldmanId, String beginDate, String endDate);
}
